package com.yksj.healthtalk.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.yksj.healthtalk.ui.R;

public class ProblemWallMainAdapter extends BaseAdapter{
	private Context context;
	LayoutInflater inflater;
	
	public  ProblemWallMainAdapter(Context context){
		this.context = context;
		inflater  = LayoutInflater.from(context);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 10;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder;
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = inflater.inflate(R.layout.problem_wall_main_item, null);
			//提出的问题
			holder.raiseQuestionTime = (TextView) convertView.findViewById(R.id.raiseQuestionTime);
			holder.raiseQuestionHeader = (ImageView)convertView.findViewById(R.id.raiseQuestionHeader);
			holder.raiseQuestionContent = (TextView)convertView.findViewById(R.id.raiseQuestionContent);
			
			holder.answerQuestionTime = (TextView) convertView.findViewById(R.id.answerQuestionTime);
			holder.answerQuestionHeader = (ImageView)convertView.findViewById(R.id.answerQuestionHeader);
			holder.answerQuestionContent = (TextView)convertView.findViewById(R.id.answerQuestionContent);
			convertView.setTag(holder);
		}else {
			holder = 	(ViewHolder) convertView.getTag();
		}
		
		
		return convertView;
	}

	
	class ViewHolder{
		TextView  raiseQuestionTime;
		ImageView  raiseQuestionHeader;
		TextView  raiseQuestionContent;
		
		TextView answerQuestionTime;
		ImageView  answerQuestionHeader;
		TextView  answerQuestionContent;
		

		
	}
}
